<div class="columns__content">
    <form id="users-info-form" method="post" action="<?= url_create('site', 'account', 'update') ?>">
        <div class="n-dialog-wrap">
            <?
            foreach ($attributeObjects as $attribute) {
                if ($attribute->p_id != 0)
                    continue;
                ?>
                <div class="n-dialog-block">
                    <div class="n-dialog-label">
                        <label for="Users_height"><?= $attribute->name ?></label></div>
                    <div class="n-dialog-inner">
                        <? if ($attribute->value_type == 0) { ?>
                            <input type="text" value="<?= $attributes[$attribute->id]->value ?>" name="attribute_<?= $attribute->id ?>" class="user-info-field">
                        <? } ?>
                        <? if ($attribute->value_type == 1) { ?>
                            <select name="attribute_<?= $attribute->id ?>" class="n-select-standart">
                                <? foreach ($attribute->children as $sub_attrib) { ?>
                                    <option value="<?= $sub_attrib->id ?>" <?
                                    if ($sub_attrib->id == $attributes[$attribute->id]->value)
                                        echo 'selected';
                                    ?>><?= $sub_attrib->name ?></option>
                                        <? } ?>
                            </select>
                        <? } ?>

                        <? if ($attribute->value_type == 2) { ?>
                            <? foreach ($attribute->children as $sub_attrib) { ?>
                                <input type="checkbox" name="attribute_<?= $attribute->id ?>[<? $attribute->id ?>]" value="<?= $sub_attrib->id ?>" <?
                                if (is_array($attributes[$attribute->id]->value) && in_array($sub_attrib->id, $attributes[$attribute->id]->value))
                                    echo 'checked';
                                ?>/>
                                <label class=""><?= $sub_attrib->name ?></label>
                                <br/>
                            <? } ?>
                        <? } ?>

                        <? if ($attribute->value_type == 3) { ?>
                            <textarea id="Users_hobbies" name="attribute_<?= $attribute->id ?>"></textarea>
                        <? } ?>
                        <div style="display:none" class="errorMessage"></div>

                    </div>
                </div>
            <? } ?>	
            <div class="n-dialog-buttons">
                <ul>
                    <li>
                        <button class="n-site-button" type="submit" name="submit"><?= lang('save') ?></button>
                    </li>
                    <li><?= lang('or') ?></li>
                    <li><a  class="js-cancel-edit js-cancel-all" href=""><?= lang('cancel') ?></a>
                    </li>
                </ul>
            </div>
        </div>
    </form>
</div>